Fix uv PEX builder to use pex3 lock export#23227
Fix uv PEX builder to use pex3 lock export#23227seungwoo-ji-03 wants to merge 6 commits intopantsbuild:mainfrom
Conversation
|
Chose
(Based on reading |
jsirois
left a comment
There was a problem hiding this comment.
@seungwoo-ji-03 this looks good to me, but a few notes - the 2nd - the existence of pex3 lock export-subset, may prove useful at some point.
When the uv PEX builder extracts pinned requirements from a PEX-native lockfile, it previously parsed the internal JSON format directly. This broke VCS and direct URL requirements (formatted as name==version instead of name @ url), and the PEX maintainer has warned that this internal format is unsupported and may change without notice.
This PR replaces JSON parsing with pex3 lock export --format pep-751 via PexCliProcess. The exported pylock.toml is passed directly to uv pip install -r, handling VCS refs, direct URLs, extras, and platform filtering out of the box.
Follow-up to #23197 (reported by @benjyw, approach suggested by @jsirois).
Supersedes #23218.